<template>
  <div class="header-container">
    <div class="btn-back" @click="btnClick"></div>
    <div class="middle-container">{{ title || '积分兑换' }}</div>
    <div class="right-container"></div>
  </div>
</template>

<script>
export default {
  name: "NavHeader",
  props: {
    title: String,
  },
  methods: {
    btnClick() {
      this.$router.go(-1);
    },
  },
};
</script>
<style lang="scss" scoped>
.header-container {
  width: 100%;
  height: 50px;
  background-color: #fff;
  border-bottom: 2px solid #f8f9fa;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .btn-back{
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    width: 10px;
    height: 10px;
    transform: rotate(45deg)
  }
  .middle-container{
    font-size: 17px;
    color: #333;
  }
}
</style>
